package example.collections;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * Created by lenovo on 2016/11/7 0007.
 * collections 类的 rotate() 来循环移动元素，方法第二个参数指定了移动的起始位置
 */
public class Move {
    public static void main(String[] args) {
        List list = Arrays.asList("one Two three Four five six".split(" "));
        System.out.println("List :" + list);
        //循环旋转元素的位置
        Collections.rotate(list, 3);
        System.out.println("rotate: " + list);
    }
}
